package com.purchase.ml.entity.prod;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_product")
@ApiModel(value = "SysProduct", description = "商品表")
public class SysProduct implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "update_at")
    @ApiModelProperty(value = "更新时间")
    private Date updateAt;

    /**
     * 品类ID
     */
    @TableField(value = "category_id")
    @ApiModelProperty(value = "品类ID")
    private Long categoryId;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    @ApiModelProperty(value = "产品ID")
    private Long productId;

    /**
     * 产品名称
     */
    @TableField(value = "product_name")
    @ApiModelProperty(value = "产品名称")
    private String productName;

    /**
     * 产品描述
     */
    @TableField(value = "description")
    @ApiModelProperty(value = "产品描述")
    private String description;

    /**
     * 品牌
     */
    @TableField(value = "brand")
    @ApiModelProperty(value = "品牌")
    private String brand;

    /**
     * 产品型号
     */
    @TableField(value = "product_model")
    @ApiModelProperty(value = "产品型号")
    private String productModel;

    /**
     * 成本
     */
    @TableField(value = "price_cost")
    @ApiModelProperty(value = "成本")
    private BigDecimal priceCost;

    /**
     * 主经销商价格
     */
    @TableField(value = "price_master_dealer")
    @ApiModelProperty(value = "主经销商价格")
    private BigDecimal priceMasterDealer;

    /**
     * 经销商价格
     */
    @TableField(value = "price_dealer")
    @ApiModelProperty(value = "经销商价格")
    private BigDecimal priceDealer;

    /**
     * 状态：0正常；1下线
     */
    @TableField(value = "state")
    @ApiModelProperty(value = "状态：0正常；1下线")
    private Integer state;

    @TableField(exist = false)
    @ApiModelProperty(value = "图片地址")
    private String picUrl;

    @TableField(exist = false)
    @ApiModelProperty(value = "目录名称")
    private String categoryName;

    @TableField(exist = false)
    private SysProductSku productSku;

    @TableField(exist = false)
    private List<SysProductPic> picList;

    private static final long serialVersionUID = 1L;
}